from fastapi import WebSocket,WebSocketDisconnect,WebSocketException
from fastapi import APIRouter, HTTPException, Depends, Request
from fastapi.responses import RedirectResponse, JSONResponse
from tools.webscoket import manager
web_router = APIRouter()

@web_router.websocket("/ws/{client_id}")
async def dingtalk_login(websocket: WebSocket, client_id: str):
    # print(WebSocket, client_id)
    print("websocket connected， 6666666")
    await manager.connect(websocket, client_id)